<?php

require_once'20161010_1.php';
$conn;
$sql='select * from n1';
$result=$conn->query($sql);

//echo '<hr/>';
//print_r($result);

//echo '<hr/>';
//echo '<pre>';
//echo $result->field_count;

//echo '<hr/>';
//print_r($result->fetch_array());

echo '<hr/>';
$rows=$result->fetch_all(MYSQLI_ASSOC);
print_r($rows);
foreach($rows as $value ) { ?>
<li><span><?php echo $value['username']; ?></span>说：<?php echo $value['content']; ?></li>
<?php } ?>



<?php
//print_r($result->fetch_assoc);
?>






